<%@ page language="java" %>

<%@ page import="com.scalar.chiptrack.commons.Constants,
                com.scalar.chiptrack.commons.SessionKeys,
                com.scalar.chiptrack.users.User,
                com.scalar.chiptrack.users.Functionality,
                com.scalar.chiptrack.utils.ConfigManager"%>

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>

<chiptrack:checkLogon sourcePage="/inventoryps.do"/>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>
<% User user1 = (User)session.getAttribute (SessionKeys.USER_KEY); %>

<html:html locale="true">

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type='text/css' rel='stylesheet'>
<style type="text/css">
a { text-decoration : none}
@page {
  size: landscape;
	}
}
</style>

<SCRIPT language="JavaScript">

function sendMail ( customerShipingId, salesOrderId )
{
    newWindow = window.open ('<%=chipTracContext%>/sendMail.do?customerShippingId='+customerShipingId +'&salesOrderId='+salesOrderId,'sendMailPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=yes,width=800,height=550,resizable=yes');
    newWindow.focus();
}

</SCRIPT>
</HEAD>
<BODY bgColor='#ffffff' leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<html:form name="inventoryPackingSlipForm" method = "POST"  type="com.scalar.chiptrack.operations.inventoryps.forms.InventoryPackingSlipForm" action="/inventoryps" >
<logic:equal name="inventoryPackingSlipForm" property="status" value="<%=Constants.CUSTOMER_SHIPPING_STATUS_CANCELLED%>">
<table border="0" width="100%" align="center" background="<%=chipTracContext%>/jsp/includes/images/cancelled_icon.gif"><tr><td>
</logic:equal>
<logic:notEqual name="inventoryPackingSlipForm" property="status" value="<%=Constants.CUSTOMER_SHIPPING_STATUS_CANCELLED%>">
<table border="0" width="100%" align="center"><tr><td>
</logic:notEqual>

    <tr>
        <td colspan="4" align="right">
            <table border=0>
                <tr>
                    <td><a href="javascript:window.print();" title='Click here to print the Inventory Packing Slip'><img src="<%=chipTracContext%>/jsp/includes/images/printer_icon_small.gif" width='80' height="50" border="0" alt=""></a></td>
                    <td>&nbsp;&nbsp;</td>
                    <td><a href="javascript:sendMail(<bean:write name='inventoryPackingSlipForm' property='packingSlipId'/> );" title='Click here to send mail'><img src="<%=chipTracContext%>/jsp/includes/images/email1.gif" border="0" alt=""></a></td>
                    <td>&nbsp;&nbsp;</td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
		<td width="30%" align="left">
			<img src="<%=chipTracContext%>/jsp/includes/images/scalar_logo.jpg" height="84" width="200" border=0>
		</td>
        <td width="35%"  align="center" class="NArialL">
			<font class='NArialW'>Inventory Packing Slip</font><br>
		</td>
        <td width="20%" class="NArialL" align="right" colspan="2">
            <table>
                <tr>
                    <td align="left" class="NArialL">
                        <bean:write name="inventoryPackingSlipForm" property="clientInfo.clientName" />
                        <bean:write name="inventoryPackingSlipForm" property="clientAddrWithOutEmailObjFormatted" filter="false"/>
                    </td>
                </tr>
            </table>
        </td>

	</tr>

    <tr>
		<td colspan='4'>
			<table width="100%" border=0 cellspacing=0 cellpadding=0>
				<tr>
			        <td bgcolor='#FFFFEE' class="NArialRS" align="left" width="40%" height="100%">
						<table width="100%" height="100%" class="NArialRS" border='1' bordercolor='#000000' cellspacing='0'>
							<tr height=30>
								<td class="NArialR" bgcolor="#DEE1E2" >From Location:</td>
							</tr>
							<tr>
								<td class="NArialRS" valign="top">&nbsp;&nbsp;&nbsp;
                                  <bean:write name="inventoryPackingSlipForm" property="fromVendorName" /><br>
                                  <bean:write name="inventoryPackingSlipForm" property="formattedFromAddress" filter="false"/>
                                </td>
							</tr>
						</table>
					</td>
					<td width="20%"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif"></td>
					<td bgcolor='#FFFFEE' class="NArialRS" align ="right"  width="40%" height="100%">
						<table width="100%" height="100%" class="NArialRS" border='1' bordercolor='#000000' cellspacing='0' >
							<tr height=30><td class="NArialR" bgcolor="#DEE1E2" >To Location:</td></tr>
							<tr>
								<td class="NArialRS" valign="top">&nbsp;&nbsp;&nbsp;
                                  <bean:write name="inventoryPackingSlipForm" property="toVendorName" /><br>
                                  <bean:write name="inventoryPackingSlipForm" property="formattedToAddress" filter="false"/>								</td>
							</tr>
			            </table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr><td colspan='4'><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>
    <tr><td colspan=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
    <tr><td colspan=4><font class="NArialR"><strong><u>Special Instructions:</u></strong></font></td></tr>
    <tr><td colspan=4 bgcolor='#DEE1E2' width="100%"><font class="NArialRS"><bean:write name="inventoryPackingSlipForm"  property="splInstructions"/></font></td></tr>

    <tr><td colspan=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
    <tr>
		<td colspan=4 width="100%">
			<table border='1' width="100%" class='NArialRS' bordercolor='#000000' cellspacing='0'>
	            <tr>
                    <td width='12%' align='center' bgcolor='#DEE1E2' class='NArialR'>PackingSlip#</td>
                    <td width='12%' align='center' bgcolor='#DEE1E2' class='NArialR'>Ship Date</td>
                    <td width='10%' align='center' bgcolor='#DEE1E2' class='NArialR'>Way Bill</td>
                    <td width='10%'  align='center' bgcolor='#DEE1E2' class='NArialR'>No of boxes</td>
                    <td width='10%' align='center' bgcolor='#DEE1E2' class='NArialR'>Weight<br>(Lbs)</td>
                    
                </tr>
                <tr>
	                <td align='center' bgcolor='#FFFFEE'><bean:write name="inventoryPackingSlipForm" property="packingSlipNumber" />&nbsp;</td>
                    <td align='center' bgcolor='#FFFFEE'><bean:write name="inventoryPackingSlipForm" property="shipDate" />&nbsp;</td>
                    <td align='center' bgcolor='#FFFFEE'><bean:write name="inventoryPackingSlipForm" property="wayBillNo" />&nbsp;</td>
                    <td align='center'  bgcolor='#FFFFEE'>&nbsp;
						<bean:write name="inventoryPackingSlipForm" property="noOfBoxes" />
					</td>
                    <td align='center' bgcolor='#FFFFEE'><bean:write name="inventoryPackingSlipForm" property="grossWeight" />&nbsp;</td>
                </tr>
            </table>
        </td>
	</tr>
    <tr><td colspan=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>

    <tr><td colspan=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
    <tr>
		<td colspan=4 width="100%">
			<table border="1" width="100%" align='center' bordercolor='#000000' cellspacing='0' cellpadding='0'>
				<tr>
					<td width="10%" nowrap align="center" bgcolor="#DEE1E2"><font class="NArialR">Part Number</font></td>

                    <td width="25%" nowrap align="center" bgcolor="#DEE1E2"><font class="NArialR">Description</font></td>
                    <td width="5%"  nowrap align="center" bgcolor="#DEE1E2"><font class="NArialR">Lot Number</font></td>
                    <td width="10%" nowrap align="center" bgcolor="#DEE1E2"><font class="NArialR">Fab Lot Number</font></td>
                    <td width="10%" nowrap align="center" bgcolor="#DEE1E2"><font class="NArialR">Qty <br>Shipped</font></td>
                    <td width="15%" nowrap align="center" bgcolor="#DEE1E2"><font class="NArialR">WaferIds</font></td>
                </tr>
                <nested:size id="listSize" property="selectedLotsList"/>
				<nested:iterate id="lotDetails" property="selectedLotsList" indexId="iterateIdx" type = "com.scalar.chiptrack.operations.dataentry.LotDetails">

                <tr>

                    <td width="10%" nowrap align="left" bgcolor="#FFFFEE"><font class="NArialRS">
						<nested:write property="partNumber"/>&nbsp;</font>
					</td>

                    <td width="10%" nowrap align="left" bgcolor="#FFFFEE"><font class="NArialRS">
						&nbsp;</font>
					</td>

                    <td width="5%" nowrap align="left" bgcolor="#FFFFEE"><font class="NArialRS">
						<nested:write property="lotNumber"/>&nbsp;</font>
					</td>
                    <td width="10%" align="center" bgcolor="#FFFFEE"><font class="NArialRS">
						<nested:write property="fabLotNumber"/>&nbsp;</font>
					</td>
                    <td width="10%" align="center" bgcolor="#FFFFEE"><font class="NArialRS">
						<nested:write property="shipQty"/>&nbsp;</font>
					</td>
                    <td width="10%" align="right" bgcolor="#FFFFEE"><font class="NArialRS">
						<nested:write property="checkedWaferIdsAsString"/>&nbsp;</font>
					</td>
                </nested:iterate>
					</table>

					</td>
                </tr>

				<%--</nested:iterate>--%>
			</table>
		</td>
	</tr>
	<tr><td colspan=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></td></tr>
	<tr>
		<td colspan=4>
			<table border="0" width="100%" align='center' bordercolor='#FFFFFF' cellspacing='2' cellpadding='2'>
				<tr><td align="center"><font class='NArialView'>CERTIFICATE OF COMPLIANCE</font></td></tr>
				<tr><td><font class='NArialRS'>THIS PRODUCT SHIPPED HERE WITH HAVE BEEN INSPECTED AND COMPLY WITH THE REQUIREMENTS OF YOUR PURCHASE ORDER TO THE EXTENT THAT SUCH REQUIREMENT HAVE BEEN ACCEPTED AND ACKNOWLEDGED BY
                <logic:notEmpty  name="inventoryPackingSlipForm" property="clientInfo.clientName" >
					<bean:write name="inventoryPackingSlipForm" property="clientInfo.clientName" />
				</logic:notEmpty>

				SUBSTANTIATING INSPECTION AND TEST ON THAT FILE.</font>
                    <br><br>
                    <font class='NArialRS'>WE CERTIFY THAT INSPECTION EVIDENCE, INCLUDING TEST DATA,NECESSARY TO SUBSTANTIATE THIS CERTIFICATION IS AVAILABLE FROM OUR FILES.</font>
                </td></tr>
				<tr><td align="center"><font class='NArialRS'><B>THANK YOU FOR YOUR BUSINESS!</B></font></td></tr>
			</table>
		</td>
	</tr>
    <tr><td colspan=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></td></tr>
    <tr>
        <td colspan="4" width="100%">
            <table border="0" width="100%">
                <tr>
                    <td width="30%" class='NArialR'>Packed By:</td>
                    <td width="20%" class='NArialR'>
                        <font class='signatureWithoutUnderLine'><bean:message key="label.signature"/></font>
                        <br>__________________________________________
                        <br>Name/Signature
                    </td>
                    <td>&nbsp;</td>
                </tr>
                <tr><td><td colspan=3><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=5></td></tr>
                <tr>
                    <td class='NArialR'>Checked By: </td>
                    <td class='NArialR'>
                        <font class='signatureWithoutUnderLine'><bean:message key="label.signature"/></font>
                        <br>__________________________________________
                        <br>Name/Signature
                    <td>&nbsp;</td>
                </tr>
                <%--<tr>
                    <td class='NArialR'>&nbsp;</td>
                    <td class='NArialR'>__________________________________________ <br>Name/Signature</td>
                    <td>&nbsp;</td>
                </tr>--%>
            </table>
        </td>
    </tr>
    <tr><td colspan=4><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=70></td></tr>
</table>
</html:form>
</body>
</html:html>